package com.wt.admin.domain.entity.image;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wt.admin.config.JacksonTypeHandler;
import com.wt.admin.config.SpringContextHolder;
import com.wt.admin.config.prop.IndexProp;
import com.wt.admin.domain.entity.PublicEntity;
import lombok.Data;

import java.util.List;

@Data
@TableName(value = "image_item")
public class ImageItemEntity extends PublicEntity {

    @TableId(value = "image_url")
    private String imageUrl;

    @TableField(value = "language_classification_id")
    private Integer languageClassificationId;

    @TableField(value = "classification_id")
    private Integer classificationId;

    @TableField(value = "features_config",typeHandler = JacksonTypeHandler.class)
    private List<Object> featuresConfig;

    // 特征数量用于快速分组
    @TableField(value = "features_num")
    private Integer featuresNum;

    // 10 图片未训练 20 图片已训练
    @TableField(value = "status")
    private Integer status;

    @TableField(value = "video_url")
    private String videoUrl;

    @TableField(value = "video_frames")
    private Integer videoFrames;


    @Data
    public static class FeaturesConfig{
        private String id;
        // featuresId
        private Integer typeID;
        private String featuresName;
        private Integer x;
        private Integer y;
        private Integer width;
        private Integer height;
    }

}
